<template>
	<view style="margin:10rpx 10px;overflow: hidden;">
		 
		<view v-html="content.content">
		
		</view>
	</view>
</template>

<script>
	 import {
	 	getProtocol
	 } from "@/api/user.js"
	export default {
		data() {
			return {
				content: [],
			}
		},
		onLoad(options) {
			console.log(options)
			this.getdetailContent(options.id) 
			let title = '协议'
			 if(options.id ==6){
				title = "用户协议"
			 }
			 if(options.id ==7){
			 	 title = "隐私协议"
			 }
			 uni.setNavigationBarTitle({
			 	title:title
			 }); 
			  
		},
		methods: {
			getdetailContent(id) {
				uni.showLoading({
					title: '正在加载'
				}) 
				getProtocol(id).then((res) => {
					this.content = res.data
					uni.hideLoading()
				}).catch((res) => {
					this.$util.Tips({
						title: res
					});
					uni.hideLoading()
				})
			} 
		}
	}
</script>

<style>

</style>